home *** CD-ROM | disk | FTP | other *** search
- _START move.l a0,_arg
- clr.b (-1,a0,d0.w)
- movea.l $4.w,a6
- lea (DOSName,pc),a1
- moveq #37,d0
- jsr (-552,a6) ; OpenLibrary()
- move.l d0,_DOSBase
- beq.s .FINISH
-
- movea.l d0,a6
- jsr (-60,a6) ; Output()
- move.l d0,_stdout
- jsr (-54,a6) ; Input()
- move.l d0,_stdin
-
- movea.l $4.w,a6
- lea (IntName,pc),a1
- moveq #37,d0
- jsr (-552,a6) ; OpenLibrary()
- move.l d0,_IntuitionBase
- beq.s .CLOSEDOS
-
- lea (GfxName,pc),a1
- moveq #37,d0
- jsr (-552,a6) ; OpenLibrary()
- move.l d0,_GfxBase
- beq.s .CLOSEINT
-
-
- xref _main
- jsr _main ; a6 is stored
- move.l d0,d2
-
- movea.l _GfxBase,a1
- jsr (-414,a6) ; CloseLibrary()
- .CLOSEINT movea.l _IntuitionBase,a1
- jsr (-414,a6) ; CloseLibrary()
- .CLOSEDOS movea.l _DOSBase,a1
- jsr (-414,a6) ; CloseLibrary()
- .FINISH move.l d2,d0
- rts
- ****************************************
- xdef _DOSBase
- xdef _IntuitionBase
- xdef _GfxBase
- xdef _arg
- xdef _stdout
- xdef _stdin
- ****************************************
- _DOSBase dc.l 0
- _IntuitionBase dc.l 0
- _GfxBase dc.l 0
- _arg dc.l 0
- _stdout dc.l 0
- _stdin dc.l 0
- ****************************************
- DOSName dc.b 'dos.library',0
- IntName dc.b 'intuition.library',0
- GfxName dc.b 'graphics.library',0
-